// pages/order-hall/orderDetail/orderDetail.js
import { callTel } from '../../../../utils/Tools'
import {getOrderDetail} from '../../../network/order'
Page({
  data: {
    status: '进行中',
    info:{},
    product:[],
    status:{
      "0":'未进行',"1":'进行中','2':'已完成'
    }
  },
  onLoad: function (options) {
    this._getOrderDetail(options.id)
  },
  //    函数事件        //
  handlePhone(e){   //   处理拨打电话
    const {phone} = e.currentTarget.dataset
    callTel(phone)
  },
  //       网络请求      //
  _getOrderDetail(data){
    getOrderDetail(data).then(res=>{
      this.setData({
        info: res.data.info,
        product: res.data.product
      })
    })
  }
})